package ar.com.mooral.data;

public class Result {

	private String icon;
	private int type;
	private String title;
	private String description;
	
	public static final int CRITICAL = 0;
	public static final int WARNING = 1;
	public static final int INFO= 2;
	

	public Result() {
		
	}

	public Result(String v) {
		
	}

	public Result(int type, String description) {
		this.setType(type);
		this.setDescription(description);
	}
	
	public Result(long v) {
		if (v < 0) {
			this.setType(Result.CRITICAL);
		} else {
			this.setType(Result.INFO);
		}
	}
	
	public boolean hasError() {
		if (this.getType() == CRITICAL) {
			return true;
		} else {
			return false;
		}
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getIcon() {
		return icon;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getType() {
		return type;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitle() {
		return title;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}
	
	
}